<?php 
class Verify extends MY_Controller {
    
    function __construct() {
        parent::__construct();
        $this->load->model('society_model', '', TRUE);
        $this->load->model('teacher_model', '', TRUE);
        
        $this->load->library('col_pro_data');
    }
    
	function ajax_get_so_info() {
    	$data = $this->_get_society_info($_SESSION['society_id']);
    	$this->output->set_output(json_encode($data));
    }
    
	function ajax_verify_pass() {
		$this->_update_society_status_and_signin_log($_SESSION['society_id'], $this->_get_teacher_name(), TEACHER_CHS, SOCIETY_REVIEW_PASS, $this->input->post("remark"));
    }
    
	function ajax_verify_failed() {
    	$this->_update_society_status_and_signin_log($_SESSION['society_id'], $this->_get_teacher_name(), TEACHER_CHS, SOCIETY_REVIEW_FAIL, $this->input->post("remark"));
    }
    
	function ajax_get_so_log() {
    	$temp = $this->society_model->_get_by_foreign_id($_SESSION['society_id']);
    	$data['s_name'] = $temp['s_name'];
    	$data['signin_log'] = $this->_get_society_sigin_log($temp['signin_log']);
    	
    	$this->output->set_output(json_encode($data));
    }

}